java solution for between two sets

visit shbcf.ru